package com.angel.bo.business.config.jdbc;

/**
 * @Author: Haibo.Mei [Haibo.Mei@ge.com]
 * @Description:数据源容器
 * @Date: 17:08 2017/11/9
 */
public class DataSourceContextHolder {

    private static final ThreadLocal<DataBaseSourceType> CONTEXT_HOLDER = new ThreadLocal<>();

    public static void setDataSourceType(DataBaseSourceType dataSourceType) {
        CONTEXT_HOLDER.set(dataSourceType);
    }

    public static DataBaseSourceType getDataSourceType() {
        return CONTEXT_HOLDER.get();
    }

    public static void clearDataSourceTypeType() {
        CONTEXT_HOLDER.remove();
    }

}